var array = [1,2,3];
var result = array.indexOf(3);
var item = array[result];
console.log(result);
console.log(item);